#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QStackedLayout>
#include "baseframemove.h"
#include "mainbar.h"
#include "title.h"
#include "status.h"
#include "uartframe.h"
#include "findpasswordform.h"
#include "registerform.h"
#include "userloginform.h"
#include "adminloginform.h"
#include "pageadminupdateinfo.h"
#include "pageuserupdateinfo.h"

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public baseFrameMove
{
    Q_OBJECT

public:
    enum StackedLayoutIndex {
        INDEX_MAINBAR = 0,
        INDEX_ADMIN_LOGIN,
        INDEX_USER_LOGIN,
        INDEX_REGISTER,
        INDEX_FIND_PASSWORD,
        INDEX_UART_FRAME
    };

    Widget(QWidget *parent = nullptr);
    ~Widget();

public slots:
    void onDisplayChanged(int index);

private:
    Ui::Widget *ui;
    Title *m_title;
    Mainbar *m_mainbar;
    Status *m_status;
    QStackedLayout *m_stackedLayout;
    uartframe *m_uartframe;
    registerForm *m_registerform;
    findPasswordForm *m_findpassword;
    adminLoginForm *m_adminloginform;
    userLoginForm *m_userloginform;

};
#endif // WIDGET_H
